/*
 * Copyright 2020 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import 'mixins';

@include Accordion {
  margin: 0.5rem 0 0;

  /** For some reason, PatternFly hard-wires this to Light-100 */
  &.pf-c-accordion {
    /* needed to up priority */
    --pf-global--BackgroundColor--100: var(--pf-global--BackgroundColor-dark-100);
  }
}

@include AccordionItem {
  h3 {
    margin: 0;
    padding: 0;
    font-size: inherit;
  }
}

@include AccordionItemButton {
  color: var(--color-text-01);
  background-color: transparent;
}

@include AccordionToggle {
  font-family: var(--font-sans-serif);
  &:focus {
    outline: none;
  }
}

@include AccordionToggleText {
  margin: 0 $accordion--spacing;
  max-width: unset;
}

.no-padding {
  @include AccordionToggle {
    font-size: 0.825rem;
  }
  @include AccordionContentBody {
    padding: 0;
  }
}

@include AccordionContentBody {
  &:before {
    display: none;
  }
}
